import { request } from "@/utils/service"
import { AnyCnameRecord } from "dns"
// import { getToken } from "@/utils/cache/cookies"
/**店铺相关 */
/** 增 */
export function createShopDataApi(data: any) {
  return request({
    url: "/youka/xhShop/add",
    method: "post",
    data
  })
}

/** 删 */
// export function deleteShopDataApi(id: string) {
//   return request({
//     url: "webSet/del",
//     method: "delete",
//     params: {
//       id
//     }
//   })
// }

/** 改 */
export function updateShopDataApi(data: any) {
  return request({
    url: "/youka/xhShop/update",
    method: "post",
    data
  })
}

/** 查 */
export function getShopDataApi(params: any) {
  return request({
    url: "/youka/xhShop/list",
    method: "get",
    params
  })
}

/**号池相关 */
/** 增 */
export function createPoolDataApi(data: any) {
  return request({
    url: "/youka/xhPool/add",
    method: "post",
    data
  })
}

/** 删 */
export function deletePoolDataApi(id: AnyCnameRecord) {
  return request({
    url: `/youka/xhPool/del/${id}`,
    method: "delete"
  })
}

/** 改 */
export function updatePoolDataApi(data: any) {
  return request({
    url: "/youka/xhPool/update",
    method: "post",
    data
  })
}

/** 查 */
export function getPoolDataApi(params: any) {
  return request({
    url: "/youka/xhPool/list",
    method: "get",
    params
  })
}
export function listProductYk(params: any) {
  return request({
    url: "/youka/numberPool/queryTC",
    method: "get",
    params
  })
}

// 号码搜索
// 查
export function getPhoneApi(params: any) {
  return request({
    url: "/youka/numberPool/queryByphone",
    method: "get",
    params
  })
}
// 查看详情
export function goodsDetails(params: any) {
  return request({
    url: "/youka/numberPool/phoneInfo",
    method: "get",
    params
  })
}
